package com.cow.support.sys.bean;

import org.springframework.context.ApplicationContext;

public class BeanFactory {
   
	 private static  ApplicationContext applicationContext=null;
	 
	 public static void loadContext(ApplicationContext sc)
	  {
		  if(sc!=null)
			 {applicationContext=sc;
			 }
	  }
	 
	  public static Object getBean(String beanId)
	  {  
		    if(applicationContext!=null)
		    {
		   return applicationContext.getBean(beanId);
	       }
		    else
		    {
		    	return null;
		    }
	  }
}
